package com.yaodian100.ec.payment.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

import com.yaodian100.core.common.entity.BaseEntity;

@Entity
@Table(name = "EC_THIRD_PARTY_TRANSFER_FAIL", uniqueConstraints = { @UniqueConstraint(columnNames = { "src", "tid" }) })
public class ThirdPartyTransferFail extends BaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8959322858056413902L;

	/**
	 * 系統流水號
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_thirdpartytransfer_fail")
	@SequenceGenerator(name = "seq_ec_thirdpartytransfer_fail", sequenceName = "seq_ec_thirdpartytransfer_fail")
	@Column(name = "id", length = 20, nullable = false)
	private String id;

	@Column(name = "order_id", length = 13, nullable = false)
	private String orderId;

	/**
	 * 
	 */
	@Column(name = "tid", length = 30)
	private String tid;

	/**
	 * 交易回傳結果：0000=成功
	 */
	@Column(name = "result", length = 4)
	private String result;

	/**
	 * 
	 */
	@Column(name = "user_id", length = 50)
	private String userId;

	/**
	 *
	 */
	@Column(name = "user_name", length = 50)
	private String userName;

	@Column(name = "user_email", length = 50)
	private String userEmail;

	/**
	 * 
	 */
	@Column(name = "user_tel", length = 50)
	private String userTel;

	/**
	 * 
	 */
	@Column(name = "user_phone", length = 50)
	private String userPhone;

	/**
	 * 
	 */
	@Column(name = "user_post", length = 50)
	private String userPost;

	/**
	 * 
	 */
	@Column(name = "user_addr", length = 50)
	private String userAddr;

	/**
	 * 
	 */
	@Column(name = "user_note", length = 350)
	private String userNote;

	/**
	 * 
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "trade_start_date")
	private Date tradeStartDt;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "trade_end_date")
	private Date tradeEndDt;

	/**
	 * 
	 */
	@Column(name = "status", length = 5, nullable = false)
	private String status;

	/**
	 * 
	 */
	@Column(name = "amount", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal amount;

	@Column(name = "src", length = 20, nullable = false)
	private String src;

	@Column(name = "bank_code", length = 50)
	private String bankCode;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public String getTid() {
		return tid;
	}

	public void setTid(String tid) {
		this.tid = tid;
	}

	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserEmail() {
		return userEmail;
	}

	public void setUserEmail(String userEmail) {
		this.userEmail = userEmail;
	}

	public String getUserTel() {
		return userTel;
	}

	public void setUserTel(String userTel) {
		this.userTel = userTel;
	}

	public String getUserPhone() {
		return userPhone;
	}

	public void setUserPhone(String userPhone) {
		this.userPhone = userPhone;
	}

	public String getUserPost() {
		return userPost;
	}

	public void setUserPost(String userPost) {
		this.userPost = userPost;
	}

	public String getUserAddr() {
		return userAddr;
	}

	public void setUserAddr(String userAddr) {
		this.userAddr = userAddr;
	}

	public String getUserNote() {
		return userNote;
	}

	public void setUserNote(String userNote) {
		this.userNote = userNote;
	}

	public Date getTradeStartDt() {
		return tradeStartDt;
	}

	public void setTradeStartDt(Date tradeStartDt) {
		this.tradeStartDt = tradeStartDt;
	}

	public Date getTradeEndDt() {
		return tradeEndDt;
	}

	public void setTradeEndDt(Date tradeEndDt) {
		this.tradeEndDt = tradeEndDt;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public String getSrc() {
		return src;
	}

	public void setSrc(String src) {
		this.src = src;
	}

	/**
	 * @return the bankCode
	 */
	public String getBankCode() {
		return bankCode;
	}

	/**
	 * @param bankCode the bankCode to set
	 */
	public void setBankCode(String bankCode) {
		this.bankCode = bankCode;
	}

}
